import request from '@/utils/request'

// 站点总览 or 查询
export function siteOverview(id, token) {
  return request({
    url: '/station',
    method: 'post',
    data: {
      access_token: 'token:12345XXXX',
      type: 'station_condition',
      data: {
        condition: {
          pid: '',
          nmae: '',
          create_time: '',
          orde_no: '',
          city: '',
          longitude: '',
          latitude: '',
          authz: '',
          conn_status: ''
        },
        page: {
          page_size: '10', // 10
          page_number: '1' // 1
        }
      }
    }
  })
}

// 增加站点
export function increaseSite(id, token) {
  return request({
    url: '/station',
    method: 'post',
    data: {
      access_token: 'token:12345XXXX',
      type: 'station_add',
      data: {
        pid: '',
        name: '广起云浮步科',
        create_time: '创建 时间',
        orde_no: '订单',
        city: '城市',
        longitude: '经度',
        latitude: '纬度'
      }
    }
  })
}

// 删除站点
export function deleteSite(id, token) {
  return request({
    url: '/station',
    method: 'post',
    data: {
      access_token: 'token:12345XXXX',
      type: 'station_del',
      ids: ['ZD201809000001']
    }
  })
}

// 修改站点
export function editSite(id, token) {
  return request({
    url: '/station',
    method: 'post',
    data: {
      access_token: 'token:12345XXXX',
      type: 'station_mod',
      data: {
        pid: 'default4',
        nmae: '广起云浮步科',
        create_time: '创建 时间',
        orde_no: '订单',
        city: '城市',
        longitude: '经度',
        latitude: '纬度',
        authz: '认证状态',
        conn_status: '连接状态'
      }
    }
  })
}

// 查看站点
export function lookSite(id, token) {
  return request({
    url: '/station',
    method: 'post',
    data: {
      access_token: 'token:12345XXXX',
      type: 'station_get_bypid',
      ids: ['ZD201809000001']
    }
  })
}
